package com.zhang.entity;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

public class Order {
    private Integer id;
    private Double goodprice;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH-mm-ss")
    private Date ordertime;
    private Integer orderstate;
    private Integer addr_id;
    private Integer user_id;
    private List<OrderItem> orderItemList;

    @Override
    public String toString() {
        return "Order{" +
                "id=" + id +
                ", goodprice=" + goodprice +
                ", ordertime=" + ordertime +
                ", orderstate=" + orderstate +
                ", addr_id=" + addr_id +
                ", user_id=" + user_id +
                '}';
    }

    public List<OrderItem> getOrderItemList() {
        return orderItemList;
    }

    public void setOrderItemList(List<OrderItem> orderItemList) {
        this.orderItemList = orderItemList;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Double getGoodprice() {
        return goodprice;
    }

    public void setGoodprice(Double goodprice) {
        this.goodprice = goodprice;
    }

    public Date getOrdertime() {
        return ordertime;
    }

    public void setOrdertime(Date ordertime) {
        this.ordertime = ordertime;
    }

    public Integer getOrderstate() {
        return orderstate;
    }

    public void setOrderstate(Integer orderstate) {
        this.orderstate = orderstate;
    }

    public Integer getAddr_id() {
        return addr_id;
    }

    public void setAddr_id(Integer addr_id) {
        this.addr_id = addr_id;
    }

    public Integer getUser_id() {
        return user_id;
    }

    public void setUser_id(Integer user_id) {
        this.user_id = user_id;
    }

    public Order(Integer id, Double goodprice, Date ordertime, Integer orderstate, Integer addr_id, Integer user_id) {
        this.id = id;
        this.goodprice = goodprice;
        this.ordertime = ordertime;
        this.orderstate = orderstate;
        this.addr_id = addr_id;
        this.user_id = user_id;
    }

    public Order() {
    }
}
